home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / emacs-19.000 / emacs-19 / usr / local / info / emacs-9 < prev    next >
Encoding:
GNU Info File  |  1995-09-11  |  47.5 KB  |  1,134 lines

  1. This is Info file ../info/emacs, produced by Makeinfo-1.55 from the
  2. input file emacs.texi.
  3.  
  4. 
  5. File: emacs,  Node: Major Modes,  Next: Indentation,  Prev: Frames,  Up: Top
  6.  
  7. Major Modes
  8. ***********
  9.  
  10.    Emacs provides many alternative "major modes", each of which
  11. customizes Emacs for editing text of a particular sort.  The major modes
  12. are mutually exclusive, and each buffer has one major mode at any time.
  13. The mode line normally shows the name of the current major mode, in
  14. parentheses (*note Mode Line::.).
  15.  
  16.    The least specialized major mode is called "Fundamental mode".  This
  17. mode has no mode-specific redefinitions or variable settings, so that
  18. each Emacs command behaves in its most general manner, and each option
  19. is in its default state.  For editing text of a specific type that
  20. Emacs knows about, such as Lisp code or English text, you should switch
  21. to the appropriate major mode, such as Lisp mode or Text mode.
  22.  
  23.    Selecting a major mode changes the meanings of a few keys to become
  24. more specifically adapted to the language being edited.  The ones which
  25. are changed frequently are TAB, DEL, and LFD.  The prefix key `C-c'
  26. normally contains mode-specific commands.  In addition, the commands
  27. which handle comments use the mode to determine how comments are to be
  28. delimited.  Many major modes redefine the syntactical properties of
  29. characters appearing in the buffer.  *Note Syntax::.
  30.  
  31.    The major modes fall into three major groups.  Lisp mode (which has
  32. several variants), C mode, Fortran mode and others are for specific
  33. programming languages.  Text mode, Nroff mode, TeX mode and Outline
  34. mode are for editing English text.  The remaining major modes are not
  35. intended for use on users' files; they are used in buffers created for
  36. specific purposes by Emacs, such as Dired mode for buffers made by Dired
  37. (*note Dired::.), and Mail mode for buffers made by `C-x m' (*note
  38. Sending Mail::.), and Shell mode for buffers used for communicating
  39. with an inferior shell process (*note Interactive Shell::.).
  40.  
  41.    Most programming language major modes specify that only blank lines
  42. separate paragraphs.  This is to make the paragraph commands useful.
  43. (*Note Paragraphs::.)  They also cause Auto Fill mode to use the
  44. definition of TAB to indent the new lines it creates.  This is because
  45. most lines in a program are usually indented.  (*Note Indentation::.)
  46.  
  47. * Menu:
  48.  
  49. * Choosing Modes::     How major modes are specified or chosen.
  50.  
  51. 
  52. File: emacs,  Node: Choosing Modes,  Prev: Major Modes,  Up: Major Modes
  53.  
  54. How Major Modes are Chosen
  55. ==========================
  56.  
  57.    You can select a major mode explicitly for the current buffer, but
  58. most of the time Emacs determines which mode to use based on the file
  59. name or on special text in the file.
  60.  
  61.    Explicit selection of a new major mode is done with a `M-x' command.
  62. From the name of a major mode, add `-mode' to get the name of a command
  63. to select that mode.  Thus, you can enter Lisp mode by executing `M-x
  64. lisp-mode'.
  65.  
  66.    When you visit a file, Emacs usually chooses the right major mode
  67. based on the file's name.  For example, files whose names end in `.c'
  68. are edited in C mode.  The correspondence between file names and major
  69. mode is controlled by the variable `auto-mode-alist'.  Its value is a
  70. list in which each element has the form
  71.  
  72.      (REGEXP . MODE-FUNCTION)
  73.  
  74. For example, one element normally found in the list has the form
  75. `("\\.c\\'" . c-mode)', and it is responsible for selecting C mode for
  76. files whose names end in `.c'.  (Note that `\\' is needed in Lisp
  77. syntax to include a `\' in the string, which is needed to suppress the
  78. special meaning of `.' in regexps.)  The only practical way to change
  79. this variable is with Lisp code.
  80.  
  81.    You can specify which major mode should be used for editing a certain
  82. file by a special sort of text in the first nonblank line of the file.
  83. The mode name should appear in this line both preceded and followed by
  84. `-*-'.  Other text may appear on the line as well.  For example,
  85.  
  86.      ;-*-Lisp-*-
  87.  
  88. tells Emacs to use Lisp mode.  Such an explicit specification overrides
  89. any defaulting based on the file name.  Note how the semicolon is used
  90. to make Lisp treat this line as a comment.
  91.  
  92.    Another format of mode specification is
  93.  
  94.      -*-Mode: MODENAME;-*-
  95.  
  96. which allows you to specify local variables as well, like this:
  97.  
  98.      -*- mode: MODENAME; VAR: VALUE; ... -*-
  99.  
  100. *Note File Variables::, for more information about this.
  101.  
  102.    When a file's contents begin with `#!', it can serve as an
  103. executable shell command, which works by running an interpreter named on
  104. the file's first line.  The rest of the file is used as input to the
  105. interpreter.
  106.  
  107.    When you visit such a file in Emacs, if the file's name does not
  108. specify a major mode, Emacs uses the interpreter name on the first line
  109. to choose a mode.  If the first line is the name of a recognized
  110. interpreter program, such as `perl' or `tcl', Emacs uses a mode
  111. appropriate for programs for that interpreter.  The variable
  112. `interpreter-mode-alist' specifies the correspondence between
  113. interpreter program names and major modes.
  114.  
  115.    When you visit a file that does not specify a major mode to use, or
  116. when you create a new buffer with `C-x b', the variable
  117. `default-major-mode' specifies which major mode to use.  Normally its
  118. value is the symbol `fundamental-mode', which specifies Fundamental
  119. mode.  If `default-major-mode' is `nil', the major mode is taken from
  120. the previously selected buffer.
  121.  
  122.    If you change the major mode of a buffer, you can go back to the
  123. major mode Emacs would choose automatically: use the command `M-x
  124. normal-mode' to do this.  This is the same function that `find-file'
  125. calls to choose the major mode.  It also processes the file's local
  126. variables list if any.
  127.  
  128. 
  129. File: emacs,  Node: Indentation,  Next: Text,  Prev: Major Modes,  Up: Top
  130.  
  131. Indentation
  132. ***********
  133.  
  134.    This chapter describes the Emacs commands that add, remove, or
  135. adjust indentation.
  136.  
  137. `TAB'
  138.      Indent current line "appropriately" in a mode-dependent fashion.
  139.  
  140. `LFD'
  141.      Perform RET followed by TAB (`newline-and-indent').
  142.  
  143. `M-^'
  144.      Merge two lines (`delete-indentation').  This would cancel out the
  145.      effect of LFD.
  146.  
  147. `C-M-o'
  148.      Split line at point; text on the line after point becomes a new
  149.      line indented to the same column that it now starts in
  150.      (`split-line').
  151.  
  152. `M-m'
  153.      Move (forward or back) to the first nonblank character on the
  154.      current line (`back-to-indentation').
  155.  
  156. `C-M-\'
  157.      Indent several lines to same column (`indent-region').
  158.  
  159. `C-x TAB'
  160.      Shift block of lines rigidly right or left (`indent-rigidly').
  161.  
  162. `M-i'
  163.      Indent from point to the next prespecified tab stop column
  164.      (`tab-to-tab-stop').
  165.  
  166. `M-x indent-relative'
  167.      Indent from point to under an indentation point in the previous
  168.      line.
  169.  
  170.    Most programming languages have some indentation convention.  For
  171. Lisp code, lines are indented according to their nesting in
  172. parentheses.  The same general idea is used for C code, though many
  173. details are different.
  174.  
  175.    Whatever the language, to indent a line, use the TAB command.  Each
  176. major mode defines this command to perform the sort of indentation
  177. appropriate for the particular language.  In Lisp mode, TAB aligns the
  178. line according to its depth in parentheses.  No matter where in the
  179. line you are when you type TAB, it aligns the line as a whole.  In C
  180. mode, TAB implements a subtle and sophisticated indentation style that
  181. knows about many aspects of C syntax.
  182.  
  183.    In Text mode, TAB runs the command `tab-to-tab-stop', which indents
  184. to the next tab stop column.  You can set the tab stops with `M-x
  185. edit-tab-stops'.
  186.  
  187. * Menu:
  188.  
  189. * Indentation Commands::  Various commands and techniques for indentation.
  190. * Tab Stops::             You can set arbitrary "tab stops" and then
  191.                             indent to the next tab stop when you want to.
  192. * Just Spaces::           You can request indentation using just spaces.
  193.  
  194. 
  195. File: emacs,  Node: Indentation Commands,  Next: Tab Stops,  Prev: Indentation,  Up: Indentation
  196.  
  197. Indentation Commands and Techniques
  198. ===================================
  199.  
  200.    To move over the indentation on a line, do `M-m'
  201. (`back-to-indentation').  This command, given anywhere on a line,
  202. positions point at the first nonblank character on the line.
  203.  
  204.    To insert an indented line before the current line, do `C-a C-o
  205. TAB'.  To make an indented line after the current line, use `C-e LFD'.
  206.  
  207.    If you just want to insert a tab character in the buffer, you can
  208. type `C-q TAB'.
  209.  
  210.    `C-M-o' (`split-line') moves the text from point to the end of the
  211. line vertically down, so that the current line becomes two lines.
  212. `C-M-o' first moves point forward over any spaces and tabs.  Then it
  213. inserts after point a newline and enough indentation to reach the same
  214. column point is on.  Point remains before the inserted newline; in this
  215. regard, `C-M-o' resembles `C-o'.
  216.  
  217.    To join two lines cleanly, use the `M-^' (`delete-indentation')
  218. command.  It deletes the indentation at the front of the current line,
  219. and the line boundary as well, replacing them with a single space.  As
  220. a special case (useful for Lisp code) the single space is omitted if
  221. the characters to be joined are consecutive open parentheses or closing
  222. parentheses, or if the junction follows another newline.  To delete
  223. just the indentation of a line, go to the beginning of the line and use
  224. `M-\' (`delete-horizontal-space'), which deletes all spaces and tabs
  225. around the cursor.
  226.  
  227.    If you have a fill prefix, `M-^' deletes the fill prefix if it
  228. appears after the newline that is deleted.  *Note Fill Prefix::.
  229.  
  230.    There are also commands for changing the indentation of several lines
  231. at once.  `C-M-\' (`indent-region') applies to all the lines that begin
  232. in the region; it indents each line in the "usual" way, as if you had
  233. typed TAB at the beginning of the line.  A numeric argument specifies
  234. the column to indent to, and each line is shifted left or right so that
  235. its first nonblank character appears in that column.  `C-x TAB'
  236. (`indent-rigidly') moves all of the lines in the region right by its
  237. argument (left, for negative arguments).  The whole group of lines
  238. moves rigidly sideways, which is how the command gets its name.
  239.  
  240.    `M-x indent-relative' indents at point based on the previous line
  241. (actually, the last nonempty line).  It inserts whitespace at point,
  242. moving point, until it is underneath an indentation point in the
  243. previous line.  An indentation point is the end of a sequence of
  244. whitespace or the end of the line.  If point is farther right than any
  245. indentation point in the previous line, the whitespace before point is
  246. deleted and the first indentation point then applicable is used.  If no
  247. indentation point is applicable even then, `indent-relative' runs
  248. `tab-to-tab-stop' (*note Tab Stops::.).
  249.  
  250.    `indent-relative' is the definition of TAB in Indented Text mode.
  251. *Note Text::.
  252.  
  253.    *Note Format Indentation::, for another way of specifying the
  254. indentation for part of your text.
  255.  
  256. 
  257. File: emacs,  Node: Tab Stops,  Next: Just Spaces,  Prev: Indentation Commands,  Up: Indentation
  258.  
  259. Tab Stops
  260. =========
  261.  
  262.    For typing in tables, you can use Text mode's definition of TAB,
  263. `tab-to-tab-stop'.  This command inserts indentation before point,
  264. enough to reach the next tab stop column.  If you are not in Text mode,
  265. this command can be found on the key `M-i'.
  266.  
  267.    You can specify the tab stops used by `M-i'.  They are stored in a
  268. variable called `tab-stop-list', as a list of column-numbers in
  269. increasing order.
  270.  
  271.    The convenient way to set the tab stops is with `M-x edit-tab-stops',
  272. which creates and selects a buffer containing a description of the tab
  273. stop settings.  You can edit this buffer to specify different tab
  274. stops, and then type `C-c C-c' to make those new tab stops take effect.
  275. In the tab stop buffer, `C-c C-c' runs the function
  276. `edit-tab-stops-note-changes' rather than its usual definition
  277. `save-buffer'.  `edit-tab-stops' records which buffer was current when
  278. you invoked it, and stores the tab stops back in that buffer; normally
  279. all buffers share the same tab stops and changing them in one buffer
  280. affects all, but if you happen to make `tab-stop-list' local in one
  281. buffer then `edit-tab-stops' in that buffer will edit the local
  282. settings.
  283.  
  284.    Here is what the text representing the tab stops looks like for
  285. ordinary tab stops every eight columns.
  286.  
  287.              :       :       :       :       :       :
  288.      0         1         2         3         4
  289.      0123456789012345678901234567890123456789012345678
  290.      To install changes, type C-c C-c
  291.  
  292.    The first line contains a colon at each tab stop.  The remaining
  293. lines are present just to help you see where the colons are and know
  294. what to do.
  295.  
  296.    Note that the tab stops that control `tab-to-tab-stop' have nothing
  297. to do with displaying tab characters in the buffer.  *Note Display
  298. Vars::, for more information on that.
  299.  
  300. 
  301. File: emacs,  Node: Just Spaces,  Prev: Tab Stops,  Up: Indentation
  302.  
  303. Tabs vs. Spaces
  304. ===============
  305.  
  306.    Emacs normally uses both tabs and spaces to indent lines.  If you
  307. prefer, all indentation can be made from spaces only.  To request this,
  308. set `indent-tabs-mode' to `nil'.  This is a per-buffer variable;
  309. altering the variable affects only the current buffer, but there is a
  310. default value which you can change as well.  *Note Locals::.
  311.  
  312.    There are also commands to convert tabs to spaces or vice versa,
  313. always preserving the columns of all nonblank text.  `M-x tabify' scans
  314. the region for sequences of spaces, and converts sequences of at least
  315. three spaces to tabs if that can be done without changing indentation.
  316. `M-x untabify' changes all tabs in the region to appropriate numbers of
  317. spaces.
  318.  
  319. 
  320. File: emacs,  Node: Text,  Next: Programs,  Prev: Indentation,  Up: Top
  321.  
  322. Commands for Human Languages
  323. ****************************
  324.  
  325.    The term "text" has two widespread meanings in our area of the
  326. computer field.  One is data that is a sequence of characters.  Any file
  327. that you edit with Emacs is text, in this sense of the word.  The other
  328. meaning is more restrictive: a sequence of characters in a human
  329. language for humans to read (possibly after processing by a text
  330. formatter), as opposed to a program or commands for a program.
  331.  
  332.    Human languages have syntactic/stylistic conventions that can be
  333. supported or used to advantage by editor commands: conventions involving
  334. words, sentences, paragraphs, and capital letters.  This chapter
  335. describes Emacs commands for all of these things.  There are also
  336. commands for "filling", which means rearranging the lines of a
  337. paragraph to be approximately equal in length.  The commands for moving
  338. over and killing words, sentences and paragraphs, while intended
  339. primarily for editing text, are also often useful for editing programs.
  340.  
  341.    Emacs has several major modes for editing human language text.  If
  342. the file contains text pure and simple, use Text mode, which customizes
  343. Emacs in small ways for the syntactic conventions of text.  Outline mode
  344. provides special commands for operating on text with an outline
  345. structure.
  346.  
  347.    For text which contains embedded commands for text formatters, Emacs
  348. has other major modes, each for a particular text formatter.  Thus, for
  349. input to TeX, you would use TeX mode.  For input to nroff, use Nroff
  350. mode.
  351.  
  352.    Instead of using a text formatter, you can edit formatted text in
  353. WYSIWYG style ("what you see is what you get"), with Enriched mode.
  354. Then the formatting appears on the screen in Emacs while you edit.
  355.  
  356. * Menu:
  357.  
  358. * Words::         Moving over and killing words.
  359. * Sentences::     Moving over and killing sentences.
  360. * Paragraphs::      Moving over paragraphs.
  361. * Pages::      Moving over pages.
  362. * Filling::       Filling or justifying text.
  363. * Case::          Changing the case of text.
  364. * Text Mode::     The major modes for editing text files.
  365. * Outline Mode::  The major mode for editing outlines.
  366. * TeX Mode::      The major modes for editing input to the formatter TeX.
  367. * Nroff Mode::    The major mode for editing input to the formatter nroff.
  368. * Formatted Text::Editing formatted text directly in WYSIWYG fashion.
  369.  
  370. 
  371. File: emacs,  Node: Words,  Next: Sentences,  Up: Text
  372.  
  373. Words
  374. =====
  375.  
  376.    Emacs has commands for moving over or operating on words.  By
  377. convention, the keys for them are all Meta characters.
  378.  
  379. `M-f'
  380.      Move forward over a word (`forward-word').
  381.  
  382. `M-b'
  383.      Move backward over a word (`backward-word').
  384.  
  385. `M-d'
  386.      Kill up to the end of a word (`kill-word').
  387.  
  388. `M-DEL'
  389.      Kill back to the beginning of a word (`backward-kill-word').
  390.  
  391. `M-@'
  392.      Mark the end of the next word (`mark-word').
  393.  
  394. `M-t'
  395.      Transpose two words or drag a word across other words
  396.      (`transpose-words').
  397.  
  398.    Notice how these keys form a series that parallels the
  399. character-based `C-f', `C-b', `C-d', `C-t' and DEL.  `M-@' is cognate
  400. to `C-@', which is an alias for `C-SPC'.
  401.  
  402.    The commands `M-f' (`forward-word') and `M-b' (`backward-word') move
  403. forward and backward over words.  These Meta characters are thus
  404. analogous to the corresponding control characters, `C-f' and `C-b',
  405. which move over single characters in the text.  The analogy extends to
  406. numeric arguments, which serve as repeat counts.  `M-f' with a negative
  407. argument moves backward, and `M-b' with a negative argument moves
  408. forward.  Forward motion stops right after the last letter of the word,
  409. while backward motion stops right before the first letter.
  410.  
  411.    `M-d' (`kill-word') kills the word after point.  To be precise, it
  412. kills everything from point to the place `M-f' would move to.  Thus, if
  413. point is in the middle of a word, `M-d' kills just the part after
  414. point.  If some punctuation comes between point and the next word, it
  415. is killed along with the word.  (If you wish to kill only the next word
  416. but not the punctuation before it, simply do `M-f' to get the end, and
  417. kill the word backwards with `M-DEL'.) `M-d' takes arguments just like
  418. `M-f'.
  419.  
  420.    `M-DEL' (`backward-kill-word') kills the word before point.  It
  421. kills everything from point back to where `M-b' would move to.  If
  422. point is after the space in `FOO, BAR', then `FOO, ' is killed.  (If
  423. you wish to kill just `FOO', do `M-b M-d' instead of `M-DEL'.)
  424.  
  425.    `M-t' (`transpose-words') exchanges the word before or containing
  426. point with the following word.  The delimiter characters between the
  427. words do not move.  For example, `FOO, BAR' transposes into `BAR, FOO'
  428. rather than `BAR FOO,'.  *Note Transpose::, for more on transposition
  429. and on arguments to transposition commands.
  430.  
  431.    To operate on the next N words with an operation which applies
  432. between point and mark, you can either set the mark at point and then
  433. move over the words, or you can use the command `M-@' (`mark-word')
  434. which does not move point, but sets the mark where `M-f' would move to.
  435. `M-@' accepts a numeric argument that says how many words to scan for
  436. the place to put the mark.  In Transient Mark mode, this command
  437. activates the mark.
  438.  
  439.    The word commands' understanding of syntax is completely controlled
  440. by the syntax table.  Any character can, for example, be declared to be
  441. a word delimiter.  *Note Syntax::.
  442.  
  443. 
  444. File: emacs,  Node: Sentences,  Next: Paragraphs,  Prev: Words,  Up: Text
  445.  
  446. Sentences
  447. =========
  448.  
  449.    The Emacs commands for manipulating sentences and paragraphs are
  450. mostly on Meta keys, so as to be like the word-handling commands.
  451.  
  452. `M-a'
  453.      Move back to the beginning of the sentence (`backward-sentence').
  454.  
  455. `M-e'
  456.      Move forward to the end of the sentence (`forward-sentence').
  457.  
  458. `M-k'
  459.      Kill forward to the end of the sentence (`kill-sentence').
  460.  
  461. `C-x DEL'
  462.      Kill back to the beginning of the sentence
  463.      (`backward-kill-sentence').
  464.  
  465.    The commands `M-a' and `M-e' (`backward-sentence' and
  466. `forward-sentence') move to the beginning and end of the current
  467. sentence, respectively.  They were chosen to resemble `C-a' and `C-e',
  468. which move to the beginning and end of a line.  Unlike them, `M-a' and
  469. `M-e' if repeated or given numeric arguments move over successive
  470. sentences.
  471.  
  472.    Moving backward over a sentence places point just before the first
  473. character of the sentence; moving forward places point right after the
  474. punctuation that ends the sentence.  Neither one moves over the
  475. whitespace at the sentence boundary.
  476.  
  477.    Just as `C-a' and `C-e' have a kill command, `C-k', to go with them,
  478. so `M-a' and `M-e' have a corresponding kill command `M-k'
  479. (`kill-sentence') which kills from point to the end of the sentence.
  480. With minus one as an argument it kills back to the beginning of the
  481. sentence.  Larger arguments serve as a repeat count.  There is also a
  482. command, `C-x DEL' (`backward-kill-sentence'), for killing back to the
  483. beginning of a sentence.  This command is useful when you change your
  484. mind in the middle of composing text.
  485.  
  486.    The sentence commands assume that you follow the American typist's
  487. convention of putting two spaces at the end of a sentence; they consider
  488. a sentence to end wherever there is a `.', `?' or `!' followed by the
  489. end of a line or two spaces, with any number of `)', `]', `'', or `"'
  490. characters allowed in between.  A sentence also begins or ends wherever
  491. a paragraph begins or ends.
  492.  
  493.    The variable `sentence-end' controls recognition of the end of a
  494. sentence.  It is a regexp that matches the last few characters of a
  495. sentence, together with the whitespace following the sentence.  Its
  496. normal value is
  497.  
  498.      "[.?!][]\"')]*\\($\\|\t\\|  \\)[ \t\n]*"
  499.  
  500. This example is explained in the section on regexps.  *Note Regexps::.
  501.  
  502.    If you want to use just one space between sentences, you should set
  503. `sentence-end' to this value:
  504.  
  505.      "[.?!][]\"')]*\\($\\|\t\\| \\)[ \t\n]*"
  506.  
  507. You should also set the variable `sentence-end-double-space' to `nil'
  508. so that the fill commands expect and leave just one space at the end of
  509. a sentence.  Note that this makes it impossible to distinguish between
  510. periods that end sentences and those that indicate abbreviations.
  511.  
  512. 
  513. File: emacs,  Node: Paragraphs,  Next: Pages,  Prev: Sentences,  Up: Text
  514.  
  515. Paragraphs
  516. ==========
  517.  
  518.    The Emacs commands for manipulating paragraphs are also Meta keys.
  519.  
  520. `M-{'
  521.      Move back to previous paragraph beginning (`backward-paragraph').
  522.  
  523. `M-}'
  524.      Move forward to next paragraph end (`forward-paragraph').
  525.  
  526. `M-h'
  527.      Put point and mark around this or next paragraph
  528.      (`mark-paragraph').
  529.  
  530.    `M-{' moves to the beginning of the current or previous paragraph,
  531. while `M-}' moves to the end of the current or next paragraph.  Blank
  532. lines and text formatter command lines separate paragraphs and are not
  533. considered part of any paragraph.  Also, an indented line starts a new
  534. paragraph.
  535.  
  536.    In major modes for programs (as opposed to Text mode), paragraphs
  537. begin and end only at blank lines.  This makes the paragraph commands
  538. continue to be useful even though there are no paragraphs per se.
  539.  
  540.    When there is a fill prefix, then paragraphs are delimited by all
  541. lines which don't start with the fill prefix.  *Note Filling::.
  542.  
  543.    When you wish to operate on a paragraph, you can use the command
  544. `M-h' (`mark-paragraph') to set the region around it.  Thus, for
  545. example, `M-h C-w' kills the paragraph around or after point.  The
  546. `M-h' command puts point at the beginning and mark at the end of the
  547. paragraph point was in.  In Transient Mark mode, it activates the mark.
  548. If point is between paragraphs (in a run of blank lines, or at a
  549. boundary), the paragraph following point is surrounded by point and
  550. mark.  If there are blank lines preceding the first line of the
  551. paragraph, one of these blank lines is included in the region.
  552.  
  553.    The precise definition of a paragraph boundary is controlled by the
  554. variables `paragraph-separate' and `paragraph-start'.  The value of
  555. `paragraph-start' is a regexp that should match any line that either
  556. starts or separates paragraphs.  The value of `paragraph-separate' is
  557. another regexp that should match only lines that separate paragraphs
  558. without being part of any paragraph.  Lines that start a new paragraph
  559. and are contained in it must match only `paragraph-start', not
  560. `paragraph-separate'.  For example, normally `paragraph-start' is `"^[
  561. \t\n\f]"' and `paragraph-separate' is `"^[ \t\f]*$"'.
  562.  
  563.    Normally it is desirable for page boundaries to separate paragraphs.
  564. The default values of these variables recognize the usual separator for
  565. pages.
  566.  
  567. 
  568. File: emacs,  Node: Pages,  Next: Filling,  Prev: Paragraphs,  Up: Text
  569.  
  570. Pages
  571. =====
  572.  
  573.    Files are often thought of as divided into "pages" by the "formfeed"
  574. character (ASCII control-L, octal code 014).  When you print hardcopy
  575. for a file, this character forces a page break; thus, each page of the
  576. file goes on a separate page on paper.  Most Emacs commands treat the
  577. page-separator character just like any other character: you can insert
  578. it with `C-q C-l', and delete it with DEL.  Thus, you are free to
  579. paginate your file or not.  However, since pages are often meaningful
  580. divisions of the file, Emacs provides commands to move over them and
  581. operate on them.
  582.  
  583. `C-x ['
  584.      Move point to previous page boundary (`backward-page').
  585.  
  586. `C-x ]'
  587.      Move point to next page boundary (`forward-page').
  588.  
  589. `C-x C-p'
  590.      Put point and mark around this page (or another page)
  591.      (`mark-page').
  592.  
  593. `C-x l'
  594.      Count the lines in this page (`count-lines-page').
  595.  
  596.    The `C-x [' (`backward-page') command moves point to immediately
  597. after the previous page delimiter.  If point is already right after a
  598. page delimiter, it skips that one and stops at the previous one.  A
  599. numeric argument serves as a repeat count.  The `C-x ]' (`forward-page')
  600. command moves forward past the next page delimiter.
  601.  
  602.    The `C-x C-p' command (`mark-page') puts point at the beginning of
  603. the current page and the mark at the end.  The page delimiter at the
  604. end is included (the mark follows it).  The page delimiter at the front
  605. is excluded (point follows it).  `C-x C-p C-w' is a handy way to kill a
  606. page to move it elsewhere.  If you move to another page delimiter with
  607. `C-x [' and `C-x ]', then yank the killed page, all the pages will be
  608. properly delimited once again.  The reason `C-x C-p' includes only the
  609. following page delimiter in the region is to ensure that.
  610.  
  611.    A numeric argument to `C-x C-p' is used to specify which page to go
  612. to, relative to the current one.  Zero means the current page.  One
  613. means the next page, and -1 means the previous one.
  614.  
  615.    The `C-x l' command (`count-lines-page') is good for deciding where
  616. to break a page in two.  It prints in the echo area the total number of
  617. lines in the current page, and then divides it up into those preceding
  618. the current line and those following, as in
  619.  
  620.      Page has 96 (72+25) lines
  621.  
  622. Notice that the sum is off by one; this is correct if point is not at
  623. the beginning of a line.
  624.  
  625.    The variable `page-delimiter' controls where pages begin.  Its value
  626. is a regexp that matches the beginning of a line that separates pages.
  627. The normal value of this variable is `"^\f"', which matches a formfeed
  628. character at the beginning of a line.
  629.  
  630. 
  631. File: emacs,  Node: Filling,  Next: Case,  Prev: Pages,  Up: Text
  632.  
  633. Filling Text
  634. ============
  635.  
  636.    "Filling" text means breaking it up into lines that fit a specified
  637. width.  Emacs does filling in two ways.  In Auto Fill mode, inserting
  638. text with self-inserting characters also automatically fills it.  There
  639. are also explicit fill commands that you can use when editing text
  640. leaves it unfilled.  When you edit formatted text, you can specify a
  641. style of filling for each portion of the text (*note Formatted Text::.).
  642.  
  643. * Menu:
  644.  
  645. * Auto Fill::      Auto Fill mode breaks long lines automatically.
  646. * Fill Commands:: Commands to refill paragraphs and center lines.
  647. * Fill Prefix::      Filling when every line is indented or in a comment, etc.
  648.  
  649. 
  650. File: emacs,  Node: Auto Fill,  Next: Fill Commands,  Up: Filling
  651.  
  652. Auto Fill Mode
  653. --------------
  654.  
  655.    "Auto Fill" mode is a minor mode in which lines are broken
  656. automatically when they become too wide.  Breaking happens only when
  657. you type a SPC or RET.
  658.  
  659. `M-x auto-fill-mode'
  660.      Enable or disable Auto Fill mode.
  661.  
  662. `SPC'
  663. `RET'
  664.      In Auto Fill mode, break lines when appropriate.
  665.  
  666.    `M-x auto-fill-mode' turns Auto Fill mode on if it was off, or off
  667. if it was on.  With a positive numeric argument it always turns Auto
  668. Fill mode on, and with a negative argument always turns it off.  You can
  669. see when Auto Fill mode is in effect by the presence of the word `Fill'
  670. in the mode line, inside the parentheses.  Auto Fill mode is a minor
  671. mode which is enabled or disabled for each buffer individually.  *Note
  672. Minor Modes::.
  673.  
  674.    In Auto Fill mode, lines are broken automatically at spaces when
  675. they get longer than the desired width.  Line breaking and
  676. rearrangement takes place only when you type SPC or RET.  If you wish
  677. to insert a space or newline without permitting line-breaking, type
  678. `C-q SPC' or `C-q LFD' (recall that a newline is really a linefeed).
  679. Also, `C-o' inserts a newline without line breaking.
  680.  
  681.    Auto Fill mode works well with Lisp mode, because when it makes a new
  682. line in Lisp mode it indents that line with TAB.  If a line ending in a
  683. comment gets too long, the text of the comment is split into two
  684. comment lines.  Optionally new comment delimiters are inserted at the
  685. end of the first line and the beginning of the second so that each line
  686. is a separate comment; the variable `comment-multi-line' controls the
  687. choice (*note Comments::.).
  688.  
  689.    Auto Fill mode does not refill entire paragraphs; it can break lines
  690. but cannot merge lines.  So editing in the middle of a paragraph can
  691. result in a paragraph that is not correctly filled.  The easiest way to
  692. make the paragraph properly filled again is usually with the explicit
  693. fill commands.  *Note Fill Commands::.
  694.  
  695.    Many users like Auto Fill mode and want to use it in all text files.
  696. The section on init files says how to arrange this permanently for
  697. yourself.  *Note Init File::.
  698.  
  699. 
  700. File: emacs,  Node: Fill Commands,  Next: Fill Prefix,  Prev: Auto Fill,  Up: Filling
  701.  
  702. Explicit Fill Commands
  703. ----------------------
  704.  
  705. `M-q'
  706.      Fill current paragraph (`fill-paragraph').
  707.  
  708. `C-x f'
  709.      Set the fill column (`set-fill-column').
  710.  
  711. `M-x fill-region'
  712.      Fill each paragraph in the region (`fill-region').
  713.  
  714. `M-x fill-region-as-paragraph.'
  715.      Fill the region, considering it as one paragraph.
  716.  
  717. `M-s'
  718.      Center a line.
  719.  
  720.    To refill a paragraph, use the command `M-q' (`fill-paragraph').
  721. This operates on the paragraph that point is inside, or the one after
  722. point if point is between paragraphs.  Refilling works by removing all
  723. the line-breaks, then inserting new ones where necessary.
  724.  
  725.    To refill many paragraphs, use `M-x fill-region', which divides the
  726. region into paragraphs and fills each of them.
  727.  
  728.    `M-q' and `fill-region' use the same criteria as `M-h' for finding
  729. paragraph boundaries (*note Paragraphs::.).  For more control, you can
  730. use `M-x fill-region-as-paragraph', which refills everything between
  731. point and mark.  This command deletes any blank lines within the
  732. region, so separate blocks of text end up combined into one block.
  733.  
  734.    A numeric argument to `M-q' causes it to "justify" the text as well
  735. as filling it.  This means that extra spaces are inserted to make the
  736. right margin line up exactly at the fill column.  To remove the extra
  737. spaces, use `M-q' with no argument.  (Likewise for `fill-region'.)
  738. Another way to control justification, and choose other styles of
  739. filling, is with the `justification' text property; see *Note Format
  740. Justification::.
  741.  
  742.    When `adaptive-fill-mode' is non-`nil' (which is normally the case),
  743. if you use `fill-region-as-paragraph' on an indented paragraph and you
  744. don't have a fill prefix, it uses the indentation of the second line of
  745. the paragraph as the fill prefix.  The effect of adaptive filling is
  746. not noticeable in Text mode, because an indented line counts as a
  747. paragraph starter and thus each line of an indented paragraph is
  748. considered a paragraph of its own.  But you do notice the effect in
  749. Indented Text mode and some other major modes.
  750.  
  751.    The command `M-s' (`center-line') centers the current line within
  752. the current fill column.  With an argument N, it centers N lines
  753. individually and moves past them.
  754.  
  755.    The maximum line width for filling is in the variable `fill-column'.
  756. Altering the value of `fill-column' makes it local to the current
  757. buffer; until that time, the default value is in effect.  The default
  758. is initially 70.  *Note Locals::.  The easiest way to set `fill-column'
  759. is to use the command `C-x f' (`set-fill-column').  With no argument,
  760. it sets `fill-column' to the current horizontal position of point.
  761. With a numeric argument, it uses that as the new fill column.
  762.  
  763.    Emacs commands normally consider a period followed by two spaces or
  764. by a newline as the end of a sentence; a period followed by just one
  765. space indicates an abbreviation and not the end of a sentence.  To
  766. preserve the distinction between these two ways of using a period, the
  767. fill commands do not break a line after a period followed by just one
  768. space.
  769.  
  770.    If the variable `sentence-end-double-space' is `nil', the fill
  771. commands expect and leave just one space at the end of a sentence.
  772. Ordinarily this variable is `t', so the fill commands insist on two
  773. spaces for the end of a sentence, as explained above.  *Note
  774. Sentences::.
  775.  
  776. 
  777. File: emacs,  Node: Fill Prefix,  Prev: Fill Commands,  Up: Filling
  778.  
  779. The Fill Prefix
  780. ---------------
  781.  
  782.    To fill a paragraph in which each line starts with a special marker
  783. (which might be a few spaces, giving an indented paragraph), use the
  784. "fill prefix" feature.  The fill prefix is a string which Emacs expects
  785. every line to start with, and which is not included in filling.
  786.  
  787. `C-x .'
  788.      Set the fill prefix (`set-fill-prefix').
  789.  
  790. `M-q'
  791.      Fill a paragraph using current fill prefix (`fill-paragraph').
  792.  
  793. `M-x fill-individual-paragraphs'
  794.      Fill the region, considering each change of indentation as
  795.      starting a new paragraph.
  796.  
  797. `M-x fill-nonuniform-paragraphs'
  798.      Fill the region, considering only paragraph-separator lines as
  799.      starting a new paragraph.
  800.  
  801.    To specify a fill prefix, move to a line that starts with the desired
  802. prefix, put point at the end of the prefix, and give the command
  803. `C-x .' (`set-fill-prefix').  That's a period after the `C-x'.  To turn
  804. off the fill prefix, specify an empty prefix: type `C-x .' with point
  805. at the beginning of a line.
  806.  
  807.    When a fill prefix is in effect, the fill commands remove the fill
  808. prefix from each line before filling and insert it on each line after
  809. filling.  Auto Fill mode also inserts the fill prefix automatically when
  810. it makes a new line.  The `C-o' command inserts the fill prefix on new
  811. lines it creates, when you use it at the beginning of a line (*note
  812. Blank Lines::.).  Conversely, the command `M-^' deletes the prefix (if
  813. it occurs) after the newline that it deletes (*note Indentation::.).
  814.  
  815.    For example, if `fill-column' is 40 and you set the fill prefix to
  816. `;; ', then `M-q' in the following text
  817.  
  818.      ;; This is an
  819.      ;; example of a paragraph
  820.      ;; inside a Lisp-style comment.
  821.  
  822. produces this:
  823.  
  824.      ;; This is an example of a paragraph
  825.      ;; inside a Lisp-style comment.
  826.  
  827.    Lines that do not start with the fill prefix are considered to start
  828. paragraphs, both in `M-q' and the paragraph commands; this is gives
  829. good results for paragraphs with hanging indentation (every line
  830. indented except the first one).  Lines which are blank or indented once
  831. the prefix is removed also separate or start paragraphs; this is what
  832. you want if you are writing multi-paragraph comments with a comment
  833. delimiter on each line.
  834.  
  835.    You can use `M-x fill-individual-paragraphs' to set the fill prefix
  836. for each paragraph automatically.  This command divides the region into
  837. paragraphs, treating every change in the amount of indentation as the
  838. start of a new paragraph, and fills each of these paragraphs.  Thus,
  839. all the lines in one "paragraph" have the same amount of indentation.
  840. That indentation serves as the fill prefix for that paragraph.
  841.  
  842.    `M-x fill-nonuniform-paragraphs' is a similar command that divides
  843. the region into paragraphs in a different way.  It considers only
  844. paragraph-separating lines (as defined by `paragraph-separate') as
  845. starting a new paragraph.  Since this means that the lines of one
  846. paragraph may have different amounts of indentation, the fill prefix
  847. used is the smallest amount of indentation of any of the lines of the
  848. paragraph.  This gives good results with styles that indent a
  849. paragraph's first line more or less that the rest of the paragraph.
  850.  
  851.    The fill prefix is stored in the variable `fill-prefix'.  Its value
  852. is a string, or `nil' when there is no fill prefix.  This is a
  853. per-buffer variable; altering the variable affects only the current
  854. buffer, but there is a default value which you can change as well.
  855. *Note Locals::.
  856.  
  857.    The `indentation' text property provides another way to control the
  858. amount of indentation paragraphs receive.  *Note Format Indentation::.
  859.  
  860. 
  861. File: emacs,  Node: Case,  Next: Text Mode,  Prev: Filling,  Up: Text
  862.  
  863. Case Conversion Commands
  864. ========================
  865.  
  866.    Emacs has commands for converting either a single word or any
  867. arbitrary range of text to upper case or to lower case.
  868.  
  869. `M-l'
  870.      Convert following word to lower case (`downcase-word').
  871.  
  872. `M-u'
  873.      Convert following word to upper case (`upcase-word').
  874.  
  875. `M-c'
  876.      Capitalize the following word (`capitalize-word').
  877.  
  878. `C-x C-l'
  879.      Convert region to lower case (`downcase-region').
  880.  
  881. `C-x C-u'
  882.      Convert region to upper case (`upcase-region').
  883.  
  884.    The word conversion commands are the most useful.  `M-l'
  885. (`downcase-word') converts the word after point to lower case, moving
  886. past it.  Thus, repeating `M-l' converts successive words.  `M-u'
  887. (`upcase-word') converts to all capitals instead, while `M-c'
  888. (`capitalize-word') puts the first letter of the word into upper case
  889. and the rest into lower case.  All these commands convert several words
  890. at once if given an argument.  They are especially convenient for
  891. converting a large amount of text from all upper case to mixed case,
  892. because you can move through the text using `M-l', `M-u' or `M-c' on
  893. each word as appropriate, occasionally using `M-f' instead to skip a
  894. word.
  895.  
  896.    When given a negative argument, the word case conversion commands
  897. apply to the appropriate number of words before point, but do not move
  898. point.  This is convenient when you have just typed a word in the wrong
  899. case: you can give the case conversion command and continue typing.
  900.  
  901.    If a word case conversion command is given in the middle of a word,
  902. it applies only to the part of the word which follows point.  This is
  903. just like what `M-d' (`kill-word') does.  With a negative argument,
  904. case conversion applies only to the part of the word before point.
  905.  
  906.    The other case conversion commands are `C-x C-u' (`upcase-region')
  907. and `C-x C-l' (`downcase-region'), which convert everything between
  908. point and mark to the specified case.  Point and mark do not move.
  909.  
  910.    The region case conversion commands `upcase-region' and
  911. `downcase-region' are normally disabled.  This means that they ask for
  912. confirmation if you try to use them.  When you confirm, you may enable
  913. the command, which means it will not ask for confirmation again.  *Note
  914. Disabling::.
  915.  
  916. 
  917. File: emacs,  Node: Text Mode,  Next: Outline Mode,  Prev: Case,  Up: Text
  918.  
  919. Text Mode
  920. =========
  921.  
  922.    When you edit files of text in a human language, it's more convenient
  923. to use Text mode rather than Fundamental mode.  Invoke `M-x text-mode'
  924. to enter Text mode.  In Text mode, TAB runs the function
  925. `tab-to-tab-stop', which allows you to use arbitrary tab stops set with
  926. `M-x edit-tab-stops' (*note Tab Stops::.).  Features concerned with
  927. comments in programs are turned off in Text mode except when explicitly
  928. invoked.  The syntax table is changed so that periods are not
  929. considered part of a word, while apostrophes, backspaces and underlines
  930. are part of words.
  931.  
  932.    A similar variant mode is Indented Text mode, intended for editing
  933. text in which most lines are indented.  This mode defines TAB to run
  934. `indent-relative' (*note Indentation::.), and makes Auto Fill indent
  935. the lines it creates.  The result is that normally a line made by Auto
  936. Filling, or by LFD, is indented just like the previous line.  In
  937. Indented Text mode, only blank lines separate paragraphs--indented
  938. lines continue the current paragraph.  Use `M-x indented-text-mode' to
  939. select this mode.
  940.  
  941.    Text mode, and all the modes based on it, define `M-TAB' as the
  942. command `ispell-complete-word', which performs completion of the
  943. partial word in the buffer before point, using the spelling dictionary
  944. as the space of possible words.  *Note Spelling::.
  945.  
  946.    Entering Text mode or Indented Text mode runs the hook
  947. `text-mode-hook'.  Other major modes related to Text mode also run this
  948. hook, followed by hooks of their own; this includes Nroff mode, TeX
  949. mode, Outline mode and Mail mode.  Hook functions on `text-mode-hook'
  950. can look at the value of `major-mode' to see which of these modes is
  951. actually being entered.  *Note Hooks::.
  952.  
  953. * Menu:
  954.  
  955.   Emacs provides two other modes for editing text that is to be passed
  956. through a text formatter to produce fancy formatted printed output.
  957.  
  958. * Nroff Mode::      The major mode for editing input to the formatter nroff.
  959. * TeX Mode::      The major modes for editing input to the formatter TeX.
  960.  
  961.   Another mode is used for editing outlines.  It allows you to view the
  962. text at various levels of detail.  You can view either the outline
  963. headings alone or both headings and text; you can also hide some of the
  964. headings at lower levels from view to make the high level structure more
  965. visible.
  966.  
  967. * Outline Mode::  The major mode for editing outlines.
  968.  
  969. 
  970. File: emacs,  Node: Outline Mode,  Next: TeX Mode,  Prev: Text Mode,  Up: Text
  971.  
  972. Outline Mode
  973. ============
  974.  
  975.    Outline mode is a major mode much like Text mode but intended for
  976. editing outlines.  It allows you to make parts of the text temporarily
  977. invisible so that you can see the outline structure.  Type `M-x
  978. outline-mode' to switch to Outline mode as the major mode of the current
  979. buffer.
  980.  
  981.    When Outline mode makes a line invisible, the line does not appear on
  982. the screen.  The screen appears exactly as if the invisible line were
  983. deleted, except that an ellipsis (three periods in a row) appears at the
  984. end of the previous visible line (only one ellipsis no matter how many
  985. invisible lines follow).
  986.  
  987.    All editing commands treat the text of the invisible line as part of
  988. the previous visible line.  For example, `C-n' moves onto the next
  989. visible line.  Killing an entire visible line, including its
  990. terminating newline, really kills all the following invisible lines
  991. along with it; yanking it all back yanks the invisible lines and they
  992. remain invisible.
  993.  
  994.    Outline minor mode provides the same commands as the major mode,
  995. Outline mode, but you can use it in conjunction with other major modes.
  996. Type `M-x outline-minor-mode' to enable the Outline minor mode in the
  997. current buffer.  You can also specify this in the text of a file, with
  998. a file local variable of the form `mode: outline-minor' (*note File
  999. Variables::.).
  1000.  
  1001.    The major mode, Outline mode, provides special key bindings on the
  1002. `C-c' prefix.  Outline minor mode provides similar bindings with `C-c
  1003. @' as the prefix; this is to reduce the conflicts with the major mode's
  1004. special commands.  (The variable `outline-minor-mode-prefix' controls
  1005. the prefix used.)
  1006.  
  1007.    Entering Outline mode runs the hook `text-mode-hook' followed by the
  1008. hook `outline-mode-hook' (*note Hooks::.).
  1009.  
  1010. * Menu:
  1011.  
  1012. * Format: Outline Format.       What the text of an outline looks like.
  1013. * Motion: Outline Motion.       Special commands for moving through
  1014.                                      outlines.
  1015. * Visibility: Outline Visibility.  Commands to control what is visible.
  1016. * Views: Outline Views.            Outlines and multiple views.
  1017.  
  1018. 
  1019. File: emacs,  Node: Outline Format,  Next: Outline Motion,  Up: Outline Mode
  1020.  
  1021. Format of Outlines
  1022. ------------------
  1023.  
  1024.    Outline mode assumes that the lines in the buffer are of two types:
  1025. "heading lines" and "body lines".  A heading line represents a topic in
  1026. the outline.  Heading lines start with one or more stars; the number of
  1027. stars determines the depth of the heading in the outline structure.
  1028. Thus, a heading line with one star is a major topic; all the heading
  1029. lines with two stars between it and the next one-star heading are its
  1030. subtopics; and so on.  Any line that is not a heading line is a body
  1031. line.  Body lines belong with the preceding heading line.  Here is an
  1032. example:
  1033.  
  1034.      * Food
  1035.      
  1036.      This is the body,
  1037.      which says something about the topic of food.
  1038.      
  1039.      ** Delicious Food
  1040.      
  1041.      This is the body of the second-level header.
  1042.      
  1043.      ** Distasteful Food
  1044.      
  1045.      This could have
  1046.      a body too, with
  1047.      several lines.
  1048.      
  1049.      *** Dormitory Food
  1050.      
  1051.      * Shelter
  1052.      
  1053.      Another first-level topic with its header line.
  1054.  
  1055.    A heading line together with all following body lines is called
  1056. collectively an "entry".  A heading line together with all following
  1057. deeper heading lines and their body lines is called a "subtree".
  1058.  
  1059.    You can customize the criterion for distinguishing heading lines by
  1060. setting the variable `outline-regexp'.  Any line whose beginning has a
  1061. match for this regexp is considered a heading line.  Matches that start
  1062. within a line (not at the left margin) do not count.  The length of the
  1063. matching text determines the level of the heading; longer matches make
  1064. a more deeply nested level.  Thus, for example, if a text formatter has
  1065. commands `@chapter', `@section' and `@subsection' to divide the
  1066. document into chapters and sections, you could make those lines count
  1067. as heading lines by setting `outline-regexp' to
  1068. `"@chap\\|@\\(sub\\)*section"'.  Note the trick: the two words
  1069. `chapter' and `section' are equally long, but by defining the regexp to
  1070. match only `chap' we ensure that the length of the text matched on a
  1071. chapter heading is shorter, so that Outline mode will know that
  1072. sections are contained in chapters.  This works as long as no other
  1073. command starts with `@chap'.
  1074.  
  1075.    It is possible to change the rule for calculating the level of a
  1076. heading line by setting the variable `outline-level'.  The value of
  1077. `outline-level' should be a function that takes no arguments and
  1078. returns the level of the current heading.  Some major modes such as C,
  1079. Nroff, and Emacs Lisp mode set this variable in order to work with
  1080. Outline minor mode.
  1081.  
  1082.    Outline mode makes a line invisible by changing the newline before it
  1083. into an ASCII control-M (code 015).  Most editing commands that work on
  1084. lines treat an invisible line as part of the previous line because,
  1085. strictly speaking, it *is* part of that line, since there is no longer a
  1086. newline in between.  When you save the file in Outline mode, control-M
  1087. characters are saved as newlines, so the invisible lines become ordinary
  1088. lines in the file.  But saving does not change the visibility status of
  1089. a line inside Emacs.
  1090.  
  1091. 
  1092. File: emacs,  Node: Outline Motion,  Next: Outline Visibility,  Prev: Outline Format,  Up: Outline Mode
  1093.  
  1094. Outline Motion Commands
  1095. -----------------------
  1096.  
  1097.    Outline mode provides special motion commands that move backward and
  1098. forward to heading lines.
  1099.  
  1100. `C-c C-n'
  1101.      Move point to the next visible heading line
  1102.      (`outline-next-visible-heading').
  1103.  
  1104. `C-c C-p'
  1105.      Move point to the previous visible heading line
  1106.      (`outline-previous-visible-heading').
  1107.  
  1108. `C-c C-f'
  1109.      Move point to the next visible heading line at the same level as
  1110.      the one point is on (`outline-forward-same-level').
  1111.  
  1112. `C-c C-b'
  1113.      Move point to the previous visible heading line at the same level
  1114.      (`outline-backward-same-level').
  1115.  
  1116. `C-c C-u'
  1117.      Move point up to a lower-level (more inclusive) visible heading
  1118.      line (`outline-up-heading').
  1119.  
  1120.    `C-c C-n' (`next-visible-heading') moves down to the next heading
  1121. line.  `C-c C-p' (`previous-visible-heading') moves similarly backward.
  1122. Both accept numeric arguments as repeat counts.  The names emphasize
  1123. that invisible headings are skipped, but this is not really a special
  1124. feature.  All editing commands that look for lines ignore the invisible
  1125. lines automatically.
  1126.  
  1127.    More powerful motion commands understand the level structure of
  1128. headings.  `C-c C-f' (`outline-forward-same-level') and `C-c C-b'
  1129. (`outline-backward-same-level') move from one heading line to another
  1130. visible heading at the same depth in the outline.  `C-c C-u'
  1131. (`outline-up-heading') moves backward to another heading that is less
  1132. deeply nested.
  1133.  
  1134.